import React, { Component } from 'react'
import { Text, View, StyleSheet, Image, FlatList } from 'react-native'
import Title from './title'
import LT from './LT';
let sn = LT
export default class Team extends Component {

    constructor(props) {
        super(props)
        this.state = {
            sn: sn
        }
    }

    componentDidMount() {
        console.log(LT)
        this.setState({ LT })
    }

    _rendersn = ({ item }) => <View style={styles.userContainer}>
        <View style={{ padding: 10, flex: 1 }}>
            <Text style={{ fontSize: 15, color: 'black' }}>  歌名：{item.sname}</Text>
            <Text style={{ fontSize: 15, color: 'black' }}>  演唱：{item.name}</Text>



        </View>
    </View>

    render() {
        return (
            <View>
                <Title />
                <FlatList data={this.state.LT} renderItem={this._rendersn} keyExtractor={sn => sn.id} />
            </View>

        )
    }
}
const styles = StyleSheet.create({
    userContainer: { margin: 1, backgroundColor: 'skyblue', flexDirection: 'row', borderRadius: 50 },
})